<?php
require '../../Tester/bootstrap.php';
require '../SxRect.php';

use Tester\Assert;

$rect = new SxRect(10, 5, 20, 10);

Assert::equal(10, $rect->getWidth());
Assert::equal(5, $rect->getHeight());

Assert::equal($rect->getRatio(), 2);

$touchInside = $rect->touchInside(1);
Assert::equal(12.5, $touchInside->getLeft());
Assert::equal(17.5, $touchInside->getRight());
Assert::equal(5, $touchInside->getTop());
Assert::equal(10, $touchInside->getBottom());
